I love me some ORM!
Snippet on making an object to be populated with data and saved. You can
pile in the Add() objects and then call the SaveChanges() once if you need
to. Such as N sales order detail lines.
public static void loadresp(String Plant, String respStr)
{
using (RingSecurityEntities1 dbb = new RingSecurityEntities1())
{
SafetyCultureResponse responseFrom = new SafetyCultureResponse();
Guid gu = Guid.NewGuid();
responseFrom.ID = gu;
responseFrom.EventDate = DateTime.Now;
responseFrom.ReponsePlant = Plant;
responseFrom.ResponsePhrase = respStr;
dbb.SafetyCultureResponses.Add(responseFrom);
dbb.SaveChanges();
}
}
On Mon, Jul 1, 2019 at 3:47 AM Alan Bourke <[email protected]> wrote:
> On Thu, 27 Jun 2019, at 6:25 PM, Kevin Cully wrote:
>
>
> > Another language command is the SCATTER NAME and GATHER NAME. The
> > ability to create an object with properties that corresponds to each
> > field of a record is incredibly useful
>
> Pick any one of the many ORMs!
>
> --
> Alan Bourke
> alanpbourke (at) fastmail (dot) fm
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/cajidmy+-5wroxg8n57hpwc+ujrkivcdvbzg-tbrakbsoiw4...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.