Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to insert multiple records at once in SQLite
Arvind Chourasiya
Jul 21 2016 2:26 AM
293
Reply
Hii
i want to insert multiple record in my SQLite table at a time. See this line of code
var items = await MgoApi.Get("Assignment/GetAssigstudents", param);
in this line i'm getting multiple record in items from API, now how can i insert items all record in local database table.
i'm using xamarin android, SQLite database with SQLiteAsyncConnection in VS2013
how i have tried see
foreach(var _items in items)
{
obj.Amount = _items.Amount;
obj.Purpose_Of_Spending = _items.Purpose_Of_Spending;
obj.Type = _items.Type;
obj.Subject=_items.Subject;
obj.Rank=_items.Rank
var RowAffted= Repository_obj.Insert(obj);
}
is this way is correct or not, if you people have more efficient way can suggest me. Thank You
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to auto increment integer + variable in c#
add one more row on windows form when click on add button c#