示例#1
0
        async public Task <VirtualCloset> Create(CreateVirtualClosetItemInfo info)
        {
            var item = new VirtualCloset(info.Name, info.Category, info.Favorite);

            closetContext.VirtualClosetItems.Add(item);
            await closetContext.SaveChangesAsync();

            return(item);
        }
 /// <summary>
 /// Converts a <see cref="Account"/> to a <see cref="AccountResponse"/>.
 /// </summary>
 public static VirtualClosetResponse ToResponse(this VirtualCloset model)
 {
     return(new VirtualClosetResponse(model.Id, model.Name, model.Category, model.Favorite));
 }