public async Task UpdateCreditUnionAsync(CoreCreditUnion union)
        {
            var newUnion = Mapper.MapUnion(union);

            _context.Entry(newUnion).State = EntityState.Modified;

            await Save();
        }
        public async Task <CoreCreditUnion> AddCreditUnionAsync(CoreCreditUnion union)
        {
            var newUnion = Mapper.MapUnion(union);

            _context.CreditUnion.Add(newUnion);
            await Save();

            return(Mapper.MapUnion(newUnion));
        }
Ejemplo n.º 3
0
        /*  ************************
         *  *                      *
         *  *    Credit Union      *
         *  *                      *
         *  ************************
         */

        public static CreditUnion MapUnion(CoreCreditUnion union)
        {
            return(new CreditUnion
            {
                UnionId = union.UnionId,
                CreditUnionName = union.CreditUnionName,
                Street = union.Street,
                State = union.State,
                City = union.City,
                Zip = union.Zip
            });
        }